from random_walk import RandomWalk
import matplotlib.pyplot as plt

# plt.style.use('seaborn-v0_8-talk')
# 指定默认字体
plt.rcParams['font.family'] = 'Kai'  # 或其他支持中文的字体
plt.rcParams['axes.unicode_minus'] = False  # 解决负号'-'显示为方块的问题

fig, ax = plt.subplots(figsize=(15, 8))

wk = RandomWalk(50_000)
wk.fill_walk()

point_numbers = range(wk.num_points)

ax.scatter(wk.x_values, wk.y_values, c = point_numbers, 
           edgecolors='none', 
           cmap=plt.cm.Blues, s=3)

# 突出起点和终点
ax.scatter(0, 0, c = 'green', edgecolors='none', s=100)
ax.scatter(wk.x_values[-1], wk.y_values[-1], c = 'red', edgecolors='none', s=100)

# 隐藏坐标
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)

plt.show()